﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CRUD;

namespace Client
{
    class Model:IModel
    { 
       public void create(string path, Person p)
       {
           Factory.gi(path).Create(p);
       }
       public MyList read(string path)
       {
           MyList a = new MyList();
           a.AddRange(Factory.gi(path).Read());
           return a;
       }
       public void update(string path, Person p)
       {
           Factory.gi(path).Update(p);         
       }
       public void delete(string path, int id)
       {
           Factory.gi(path).Delete(id);         
       }
    }
}
